import request from '@/utils/request'
const api_name = '/admin/edu/course'
export default {
  addCourseInfo(courseInfo) {
    return request({
      url: `/eduservice/course/addCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },
  getListTeacher() {
    return request({
      url: `/eduservice/teacher/findAll`,
      method: 'get'
    })
  },

  getCourseInfo(id){
    return request({
      url:'/eduservice/course/getCourseInfo/'+id,
      method:'get'
    })
  },
  updateCourseInfo(courseInfo){
    return request({
      url:'/eduservice/course/updateCourseInfo',
      method:'post',
      data:courseInfo
    })
  },
// 课程确认信息显示
  getPublishCourseInfo(id){
    return request({
      url:'/eduservice/course/getPublishCourseInfo/'+id,
      method:'get'
    })
  },
// 课程最终发布
  publishCourse(id){
    return request({
      url:'/eduservice/course/publishCourse/'+id,
      method:'post'
    })
  },

  getPageList(page, limit, searchObj) {
    return request({
      url: `/eduservice/course/pageCourseCondition/${page}/${limit}`,
      method: 'post',
      params: searchObj
    })
  },

}
